package test.mllib.regression;

import java.io.FileOutputStream;
import java.io.IOException;

public class MakeFile {
	public static void main(String[] args) throws IOException {
		FileOutputStream fos = new FileOutputStream("..\\..\\data\\spark\\mllib\\LinearRegressionTest.txt");
		
		int a = 2;
		int b = 3;
		int c = 4;
		int d = 1;
		
		for(int i = 0; i < 1000000; i ++){
			
			int x1 = (int)(Math.random() * 10000) + 1;
			int x2 = (int)(Math.random() * 10000) + 1;
			int x3 = (int)(Math.random() * 10000) + 1;
			int x4 = (int)(Math.random() * 10000) + 1;

			int y = a*x1 + b*x2 + c*x3 + d*x4;
			fos.write((y+","+x1+" "+x2+" "+x3+" "+x4+"\n").getBytes());
		}
		fos.close();
	}
}
